function LogLikelihood = IndivVoterObjFunInfoTest_Senate(Theta, VoteDem, VoterIdeal, CandTypeDem, CandTypeRep, DemCandIdeal, DemPartyIdeal, RepCandIdeal, RepPartyIdeal, RHSControls, UtilFuncParam, ChoiceProbForm)


Lambdas = Theta(1:2,:);
Betas = Theta(3:4,:);
Gamma = Theta(length(Theta),:);

if length(RHSControls(1,:)) >= 1
    RHSCoeff = Theta(5:4+length(RHSControls(1,:)),:);
    SingleIndexVal = CandTypeDem(:,1:2)*Betas(1:2,:) - CandTypeRep(:,1:2)*Betas(1:2,:) + RHSControls*RHSCoeff;
else
    SingleIndexVal = CandTypeDem(:,1:2)*Betas(1:2,:) - CandTypeRep(:,1:2)*Betas(1:2,:);
end


EstPosDem = DemCandIdeal;
EstPosRep = RepCandIdeal;
SingleIndexPolicy = -Gamma.*abs(EstPosDem-VoterIdeal).^UtilFuncParam+Gamma.*abs(EstPosRep-VoterIdeal).^UtilFuncParam;

SingleIndex = SingleIndexPolicy + SingleIndexVal;

if ChoiceProbForm == 1

    PrVoteLeft = normcdf(SingleIndex, 0, 1);

elseif ChoiceProbForm == 2
    
    PrVoteLeft = exp(SingleIndex)./(1+exp(SingleIndex));
    
end

PrVoteLeft(PrVoteLeft==0,:) = 10^(-10);
PrVoteLeft(PrVoteLeft==1,:) = 1-10^(-10);

LogLikelihood = -sum(VoteDem.*log(PrVoteLeft)+(1-VoteDem).*log(1-PrVoteLeft));